<?php
session_start();

require_once $_SERVER['DOCUMENT_ROOT']."/crc/geral/uteis/imports.php";
require_once $_SERVER['DOCUMENT_ROOT']."/crc/controle/CasaControler.php";
require_once $_SERVER['DOCUMENT_ROOT']."/crc/modelo/Casa.php";

$idCasa = $_GET["idCasa"];


$casaControle = new CasaControler();

if($casa = $casaControle->carregarCasa($idCasa)){
	$_SESSION["id_casa"] = $casa->getIdCasa();
	$_SESSION["descricao_casa"] = $casa->getDescricao(); 
}
else{
	echo "<script>alert('Ocorreu um erro ao carregar a casa');</script>";	
}	